package com.loan.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.loan.system.domain.UserRelationEntity;
import com.loan.system.mapper.UserRelationMapper;
import com.loan.system.service.UserRelationService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author shiguang on 2022/9/19 15:23
 */
@Service
@RequiredArgsConstructor
public class UserRelationServiceImpl implements UserRelationService {

    private final UserRelationMapper userRelationMapper;

    @Override
    public List<UserRelationEntity> getUserRelation(Long userId) {
        return userRelationMapper.selectList(new QueryWrapper<UserRelationEntity>().eq("user_id",userId).orderByAsc("id"));
    }
}
